javax.realtime
Interface Schedulable

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
AsyncEventHandler, RealtimeThread

public interface Schedulable
extends java.lang.Runnable

Handlers and other objects can be run by a Scheduler if they provide a run() method and the methods defined below. The Scheduler uses this information to create a suitable context to execute the run() method.


Method Summary
 boolean addToFeasibility()
          Inform the scheduler and cooperating facilities that the resource demands (as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters) of this instance of Schedulable will be considered in the feasibility analysis of the associated Scheduler until further notice.
 MemoryParameters getMemoryParameters()
           
 ProcessingGroupParameters getProcessingGroupParameters()
           
 ReleaseParameters getReleaseParameters()
           
 Scheduler getScheduler()
           
 SchedulingParameters getSchedulingParameters()
           
 boolean removeFromFeasibility()
          Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters, of this instance of Schedulable should no longer be considered in the feasibility analysis of the associated Scheduler.
 void setMemoryParameters(MemoryParameters memory)
          Set the MemoryParameters of this schedulable object.
 boolean setMemoryParametersIfFeasible(MemoryParameters memory)
           
 void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
          Set the ProcessingGroupParameters of this schedulable object.
 boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParameters)
           
 void setReleaseParameters(ReleaseParameters release)
          Set the ReleaseParameters of this object
 boolean setReleaseParametersIfFeasible(ReleaseParameters release)
          Set the ReleaseParameters of this object if feasible
 void setScheduler(Scheduler scheduler)
          Set the Scheduler of this object
 void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memoryParameters, ProcessingGroupParameters processingGroup)
          Set the Scheduler and associated parameters of this object
 void setSchedulingParameters(SchedulingParameters scheduling)
          Set the SchedulingParameters of this object
 boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
          Set the SchedulingParameters of this object if feasible
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

addToFeasibility

public boolean addToFeasibility()
Inform the scheduler and cooperating facilities that the resource demands (as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters) of this instance of Schedulable will be considered in the feasibility analysis of the associated Scheduler until further notice. Whether the resulting system is feasible or not, the addition is completed.

Returns:
true if the resulting system is feasible.

getMemoryParameters

public MemoryParameters getMemoryParameters()
Returns:
the MemoryParameters of this schedulable object.

getProcessingGroupParameters

public ProcessingGroupParameters getProcessingGroupParameters()
Returns:
the ProcessingGroupParameters of this schedulable object.

getReleaseParameters

public ReleaseParameters getReleaseParameters()
Returns:
the ReleaseParameters of this schedulable object.

getScheduler

public Scheduler getScheduler()
Returns:
the Scheduler of this schedulable object.

getSchedulingParameters

public SchedulingParameters getSchedulingParameters()
Returns:
the SchedulingParameters of this schedulable object.

removeFromFeasibility

public boolean removeFromFeasibility()
Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters, of this instance of Schedulable should no longer be considered in the feasibility analysis of the associated Scheduler. Whether the resulting system is feasible or not, the subtraction is completed.

Returns:
true if the resulting system is feasible.

setMemoryParameters

public void setMemoryParameters(MemoryParameters memory)
Set the MemoryParameters of this schedulable object.

Parameters:
memory - the MemoryParameters object.

setMemoryParametersIfFeasible

public boolean setMemoryParametersIfFeasible(MemoryParameters memory)
Parameters:
memory -
Returns:
true if the resulting system is feasible.

setProcessingGroupParameters

public void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
Set the ProcessingGroupParameters of this schedulable object.

Parameters:
groupParameters - the ProcessingGroupParameters object.

setProcessingGroupParametersIfFeasible

public boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParameters)
Parameters:
groupParameters -
Returns:
true if the resulting system is feasible.

setReleaseParameters

public void setReleaseParameters(ReleaseParameters release)
Set the ReleaseParameters of this object

Parameters:
release -

setReleaseParametersIfFeasible

public boolean setReleaseParametersIfFeasible(ReleaseParameters release)
Set the ReleaseParameters of this object if feasible

Parameters:
release -
Returns:
true if the resulting system is feasible.

setScheduler

public void setScheduler(Scheduler scheduler)
                  throws java.lang.IllegalThreadStateException
Set the Scheduler of this object

Parameters:
scheduler -
Throws:
IllegalThreadStateException
java.lang.IllegalThreadStateException

setScheduler

public void setScheduler(Scheduler scheduler,
                         SchedulingParameters scheduling,
                         ReleaseParameters release,
                         MemoryParameters memoryParameters,
                         ProcessingGroupParameters processingGroup)
                  throws java.lang.IllegalThreadStateException
Set the Scheduler and associated parameters of this object

Parameters:
scheduler -
scheduling -
release -
memoryParameters -
processingGroup -
Throws:
IllegalThreadStateException
java.lang.IllegalThreadStateException

setSchedulingParameters

public void setSchedulingParameters(SchedulingParameters scheduling)
Set the SchedulingParameters of this object

Parameters:
scheduling -

setSchedulingParametersIfFeasible

public boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
Set the SchedulingParameters of this object if feasible

Parameters:
scheduling -
Returns:
true if the resulting system is feasible.